package com.yl.chainStore.entity.pay

import com.baomidou.mybatisplus.annotation.IdType
import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import com.yl.chainStore.common.enums.TypeEnum
import com.yl.common.annotation.NoArg
import com.yl.common.getContext
import java.util.*

/**
 * <p>
 * 订单价格变动记录表(目前下单付款后)
 * </p>
 *
 * @author cxw
 * @since 2022-05-09
 */
@NoArg
@TableName("pay_customer_order_money_update_log")
    data class PayCustomerOrderMoneyUpdateLog  (

    /**
     * 订单价格变动记录表
     */
    @TableId(value = "id", type = IdType.AUTO)
    var id: Long? = null,

    /**
     * 修改前金额
     */
    @TableField("before_money")
    var beforeMoney: Long? = null,

    /**
     * 修改后金额
     */
    @TableField("after_money")
    var afterMoney: Long? = null,

    /**
     * 订单id
     */
    @TableField("order_id")
    var orderId: Long? = null,

    /**
     * 修改类型
     */
    @TableField("update_type")
    var updateType: TypeEnum? = null,

    /**
     * 关联操作id
     */
    @TableField("associated_id")
    var associatedId: Long? = null,

    /**
     * 创建时间
     */
    @TableField("create_time")
    var createTime: Date = Date(),

    /**
     * 创建人
     */
    @TableField("create_user_id")
    var createUserId: Long = getContext().userId,

)
